Skip to content

Comments

Ruff152#489

Merged
inducer merged 2 commits intomainfrom
ruff152
Feb 20, 2026
Merged

Ruff152#489
inducer merged 2 commits intomainfrom
ruff152

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 22:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the codebase to align with newer Ruff linting expectations, primarily through import style normalization and small refactors that simplify control flow without changing behavior.

Changes:

  • Normalize imports (e.g., from pytools import obj_array, from matplotlib import cm, from pyvisfile import vtk, etc.) across tests, examples, and library modules.
  • Apply small simplifications/refactors (direct return, list comprehensions, simplified asserts, minor loop simplification).
  • Update lint configuration to ignore a few additional Ruff rules and add per-file ignores for S102 in docs/tests.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/test_visualization.py Switch pytools.obj_array import style to satisfy lint/import conventions.
test/test_refinement.py Normalize matplotlib colormap import (from matplotlib import cm).
test/test_meshmode.py Normalize obj_array import and simplify dimension assertion.
test/test_chained.py Simplify helpers by returning constructed values directly.
test/test_array.py Normalize obj_array import style.
pyproject.toml Adjust Ruff ignore list and add per-file ignores for S102 in docs/tests.
meshmode/mesh/visualization.py Replace manual loop appends with a generator-based extend.
meshmode/mesh/tools.py Simplify returns and inline temporary variables.
meshmode/mesh/processing.py Minor dict-iteration simplification (for k in dict).
meshmode/mesh/generation.py Return glue_mesh_boundaries(...) directly for periodic meshes.
meshmode/interop/firedrake/mesh.py Normalize Firedrake dmcommon import style.
meshmode/discretization/visualization.py Normalize imports and simplify connectivity equality check; normalize optional imports.
meshmode/discretization/connection/projection.py Replace manual list-building loops with list comprehensions.
meshmode/discretization/connection/chained.py Replace manual list-building loop with list comprehension.
meshmode/discretization/__init__.py Normalize obj_array import style.
meshmode/array_context.py Inline return for DAG transform result.
examples/simple-dg.py Normalize imports and simplify branching for face-embedding selection.
examples/parallel-vtkhdf.py Use __name__ for logger name (module logger best practice).
examples/moving-geometry.py Normalize obj_array import style.
examples/from_firedrake.py Normalize matplotlib colormap import (from matplotlib import cm).
.basedpyright/baseline.json Update basedpyright baseline ranges/codes to match current analysis output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@inducer inducer enabled auto-merge (rebase) February 20, 2026 22:24
@inducer inducer merged commit 33d5f48 into main Feb 20, 2026
16 checks passed
@inducer inducer deleted the ruff152 branch February 20, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant